<template>
  <div>
    <q-btn v-if="showEdit" flat round dense color="primary" icon="edit" @click="edit" v-auth="`${modelName}:edit`">
      <q-tooltip>编辑</q-tooltip>
    </q-btn>
    <btn-del v-if="showDelete" :label="label" @confirm="confirm" v-auth="`${modelName}:delete`" />
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    showEdit: {
      type: Boolean,
      default: true,
    },
    showDelete: {
      type: Boolean,
      default: true,
    },
    modelName: {
      type: String,
      default: 'empty',
    },
    label: {
      type: String,
      default: '导出',
    },
    props: Object,
  },
  data() {
    return {
    };
  },
  watch: {
  },
  computed: {},
  methods: {
    confirm() {
      this.$emit('confirm', this.props.row);
    },
    edit() {
      this.$emit('edit', this.props.row);
    },
  },
  created() { },
  mounted() {
  },
};
</script>
<style lang="stylus"></style>
